const { Switch } = require("../lib/types");

module.exports = {
    name: "ngx_http_scgi_module",
    map: {
        scgi_bind: [[Switch, String], , ["http", "server", "location"]],
        scgi_buffer_size: [String, "4k|8k", ["http", "server", "location"]],
        scgi_buffering: [Switch, true, ["http", "server", "location"]],
        scgi_buffers: [String, "8 4k|8k", ["http", "server", "location"]],
        scgi_busy_buffers_size: [String, "8k|16k", ["http", "server", "location"]],
        scgi_cache: [[Switch, String], false, ["http", "server", "location"]],
        scgi_cache_background_update: [Switch, false, ["http", "server", "location"]],
        scgi_cache_bypass: [String, , ["http", "server", "location"]],
        scgi_cache_key: [String, , ["http", "server", "location"]],
        scgi_cache_lock: [Switch, false, ["http", "server", "location"]],
        scgi_cache_lock_age: [String, "5s", ["http", "server", "location"]],
        scgi_cache_lock_timeout: [String, "5s", ["http", "server", "location"]],
        scgi_cache_max_range_offset: [Number, , ["http", "server", "location"]],
        scgi_cache_methods: [String, "GET HEAD", ["http", "server", "location"]],
        scgi_cache_min_uses: [Number, 1, ["http", "server", "location"]],
        scgi_cache_path: [String, , "http"],
        scgi_cache_purge: [String, , ["http", "server", "location"]],
        scgi_cache_revalidate: [Switch, false, ["http", "server", "location"]],
        scgi_cache_use_stale: [[Switch, String], false, ["http", "server", "location"]],
        scgi_cache_valid: [String, , ["http", "server", "location"]],
        scgi_connect_timeout: [String, "60s", ["http", "server", "location"]],
        scgi_force_ranges: [Switch, false, ["http", "server", "location"]],
        scgi_hide_header: [String, , ["http", "server", "location"]],
        scgi_ignore_client_abort: [Switch, false, ["http", "server", "location"]],
        scgi_ignore_headers: [String, , ["http", "server", "location"]],
        scgi_intercept_errors: [Switch, false, ["http", "server", "location"]],
        scgi_limit_rate: [String, "0", ["http", "server", "location"]],
        scgi_max_temp_file_size: [String, "1024m", ["http", "server", "location"]],
        scgi_next_upstream: [String, "error timeout", ["http", "server", "location"]],
        scgi_next_upstream_timeout: [String, "0", ["http", "server", "location"]],
        scgi_next_upstream_tries: [Number, 0, ["http", "server", "location"]],
        scgi_no_cache: [String, , ["http", "server", "location"]],
        scgi_param: [String, , ["http", "server", "location"]],
        scgi_pass: [String, , ["http", "server", "location", "if"]],
        scgi_pass_header: [String, , ["http", "server", "location"]],
        scgi_pass_request_body: [Switch, true, ["http", "server", "location"]],
        scgi_pass_request_headers: [Switch, true, ["http", "server", "location"]],
        scgi_read_timeout: [String, "60s", ["http", "server", "location"]],
        scgi_request_buffering: [Switch, true, ["http", "server", "location"]],
        scgi_send_timeout: [String, "60s", ["http", "server", "location"]],
        scgi_socket_keepalive: [Switch, false, ["http", "server", "location"]],
        scgi_store: [[Switch, String], false, ["http", "server", "location"]],
        scgi_store_access: [String, "user:rw", ["http", "server", "location"]],
        scgi_temp_file_write_size: [String, "8k|16k", ["http", "server", "location"]],
        scgi_temp_path: [String, "scgi_temp", ["http", "server", "location"]]
    }
};